package org.train.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.train.entity.User;
import org.train.service.UserService;
import org.train.util.R;

@Controller
public class UserController{
    @Autowired
    private UserService service;

    @PostMapping(value = "/register")
    @ResponseBody
    public R register(User user){
        return service.saveUser(user);
    }
}
